<form action="/admin/$tabletype/$id" method="post" id="form">
    <input type="hidden" name="_method" value="put"/><input type="hidden" name="id" value="$id"/>
    <table data-filter="#filter" class="footable" data-page-size="5">
        <thead>
            <tr>
                <th data-class="expand" data-sort-initial="true">
                    name
                </th>
                <th data-hide="phone,tablet">
                    value
                </th>
            </tr>
        </thead>
        <tbody>
            #if("$tabletype"=="legend")
			<input type="hidden" name="createtime" value='$!date.format("yyyy-MM-dd HH:mm:ss",$!legend.createtime)'/>
            <tr>
                <td>
                    name
                </td>
                <td>
                    <input type="text" name="name" id="name" value="$!legend.name">
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    ip
                </td>
                <td>
                    <input type="text" name="ip" id="ip" value="$!legend.ip">
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    opentime
                </td>
                <td>
                    <input type="text" name="opentime" id="opentime" value='$!date.format("yyyy-MM-dd HH:mm:ss",$!legend.opentime)'>
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    detail
                </td>
                <td>
                    <input type="text" name="detail" id="detail" value="$!legend.detail">
                    </input>
                </td>
            </tr>
			 <tr>
                <td>
                    index
                </td>
                <td>
                     <input type="text" name="index" id="detail" value="$!legend.index">
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    qq
                </td>
                <td>
                    <input type="text" name="qq" id="qq" value="$!legend.qq">
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    line
                </td>
                <td>
                    <input type="text" name="line" id="line" value="$!legend.line">
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    top
                </td>
                <td>
                	#selectTag("top_temp",$top,$!legend.top,"choose") 
                </td>
            </tr>
            <tr>
                <td>
                    topbegintime
                </td>
                <td>
                    <input type="text" name="topbegintime" id="topbegintime" value='$!date.format("yyyy-MM-dd HH:mm:ss",$!legend.topbegintime)'>
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    topendtime
                </td>
                <td>
                    <input type="text" name="topendtime" id="topendtime" value='$!date.format("yyyy-MM-dd HH:mm:ss",$!legend.topendtime)'>
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    type
                </td>
                <td>
                   #selectTag("type",$type,$!legend.type,"choose") 
                </td>
            </tr>
            <tr>
                <td>
                    weight
                </td>
                <td>
                    <input type="text" name="weight" id="weight" value="$!legend.weight">
                    </input>
                </td>
            </tr>
			#end
            #if("$tabletype"=="ad")
			<input type="hidden" name="createtime"  value='$!date.format("yyyy-MM-dd HH:mm:ss",$!ad.createtime)'/>
            <tr>
                <td>
                    ad
                </td>
                <td>
                    <input type="text" name="ad" id="ad" value="$!ad.ad">
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    enable
                </td>
                <td>
                	#selectTag("enable",$enable,$!ad.enable,"choose") 
                </td>
            </tr>
            <tr>
                <td>
                    begintime
                </td>
                <td>
                    <input type="text" name="begintime" id="begintime" value='$!date.format("yyyy-MM-dd HH:mm:ss",$!ad.begintime)'>
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    endtime
                </td>
                <td>
                    <input type="text" name="endtime" id="endtime" value='$!date.format("yyyy-MM-dd HH:mm:ss",$!ad.endtime)'>
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    weight
                </td>
                <td>
                    <input type="text" name="weight" id="weight" value="$!ad.weight">
                    </input>
                </td>
            </tr>
            <tr>
                <td>
                    index
                </td>
                <td>
                    #selectTag("index_temp",$index,$!ad.index,"choose") 
                </td>
            </tr>#end
			<tr><td>删除</td><td><a href="/admin/$tabletype/$id/delete">删除记录</a></td></tr>

        </tbody>
    </table>
    <div>
        <input class="pl fr" type="submit" value="提交"/>
    </div>
    <br/>
    <br/>
    <br/>
</form>
